#!/usr/bin/env python
# -*-coding:utf-8-*-
# File    : liyuqi.py


from selenium import webdriver
from selenium.webdriver.chrome.options import Options

chrome_options = Options()
chrome_options.add_experimental_option("debuggerAddress", "127.0.0.1:9222")

driver = webdriver.Chrome(options=chrome_options)

#获取所有的复选框
checkbox_eles = driver.find_elements_by_css_selector(
    'div#signup input[type="checkbox"]'
)

for checkbox in checkbox_eles:
    #判断复选框选中状态
    if checkbox.is_selected():
        checkbox.click()